# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.test import TestCase
from userManager.models import UserManager
# Create your tests here.
def getAllUser():
	return UserManager.objects.all()

def findUserByAccount(_account):
    try:
	    user = UserManager.objects.get(user_account=_account)
	    return user
    except:
        return None

def createUser(_account,_pwd,_email,_photo,_profile):
    user = UserManager(user_account=_account, user_pwd=_pwd, user_email=_email, user_avatar=_photo, user_profile=_profile)
    user.save()
    
def delUserByAccount(_account):
    UserManager.objects.filter(user_account=_account).delete()